package net.flyinggroup.mapstruct.collection;

import org.mapstruct.Mapper;

import java.util.List;

@Mapper
public interface EmployeeMapper {

    EmployeeDTO  toEmployeeDTO(Employee employee);

    List<EmployeeDTO> toEmployeeDTOs(List<Employee> employees);

    List<EmployeeFullNameDTO> toEmployeeFullNameDTOs(List<Employee> employees);

    default EmployeeFullNameDTO toEmployeeFullNameDTO(Employee employee) {
        EmployeeFullNameDTO employeeInfoDTO = new EmployeeFullNameDTO();
        employeeInfoDTO.setFullName(employee.getFirstName() + employee.getLastName());
        return employeeInfoDTO;
    }
}
